<div class="list">
<span class="txt"><a class="ajax2" href='javascript:void(0);'></a></span>
	<table cellspacing="0" cellpadding="0">
		<tr class="th">
			<th>ID</th>	
			<th>管理员名称</th>
			<th>操作</th>	
		</tr>
		<?php foreach($users as $item):?>
		<tr class="bg">
			<td width="60"><?php echo $item['id'];?></td>
			<td><?php echo $item['name'];?></td>
			<td class="odd">
				<a class="ajax" href='javascript:void(0);' id="<?php echo $item['id'];?>" >编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;
				<a class='del' id="<?php echo $item['id'];?>" href='javascript:void(0);' >删除</a>
			</td>
		</tr>

		<?php endforeach;?>
	</table>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$(".bg:odd").css("background-color","#EDEDED");
	$(".ajax").mouseover(function(){
        id = $(this).attr('id');
        $(".ajax").wBox({requestType: "ajax",title:"管理员信息修改",target:"<?php echo url('manager/edit?id=')?>"+id});
    });
	$(".ajax2").mouseover(function(){
        $(".ajax2").wBox({requestType: "ajax",title:"添加管理员",target:"<?php echo url('manager/add?id=')?>"});
    });
	$(".del").click(function(){
		if(confirm("确认删除")){
			that = $(this);
			$.post("<?php echo url('manager/del');?>",{id:that.attr('id')},function(data){
				if(data.s==1){
					that.parents('tr').remove();
				}else{
					alert(data.i);
				}
			});
		}
		return false;
		});	
});
</script>
